package test3;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;


public class Inquire {
    String[] str = new String[52];
    int n = 0;
    public static int[] num = new int[52];

    public Inquire() {
        for (int j = 0; j < 52; j++) {
            str[j] = "";
            num[j] = 0;
        }

        File fp = new File("src/election.txt");
        InputStream i = null;
        try {
            i = new FileInputStream(fp);
            int temp;
            while ((temp = i.read()) != -1) {
                if ((char) temp == '/') {
                    n++;
                } else {
                    str[n] = str[n] + (char) temp;
                }
            }
            for (int j = 1; j <= 52; j++) {
                for (int k = 1; k <= 52; k++) {
                    if (str[k - 1].equals("" + j)) {
                        num[j - 1]++;
                    }
                }
            }

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                i.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}

